// pages/index/index.js
Page({
  data: {
    announcementList: []
  },
  onLoad() {
    // 测试网络请求
    this.getAnnouncement()

  },
  async getAnnouncement() {
    const res = await wx.http({
      url: '/announcement',
    })
    // console.log(res);
    this.setData({
      announcementList: res.data
    })
  }

})
